package com.baidu.process.chat.core.action;

/**
 * @Author:fangyuchao
 * @Description: 动作指令，对应返回im的bot值
 * @Date: Create in 9:54 2022/11/8
 */

public enum Actions {
    //正常对话
    DEFAULT("0"),
    //挂断
    HANGUP("1"),
    //转人工
    CUSTOMER("2"),
    //满意度
    SATISFIED("3"),
    //
    CLOSE("4");
private String code;

    Actions(String code) {
        this.code=code;
    }


    public String getCode(){
        return  code;
    }

    public static Actions instanceOf(String code){
        for (final Actions action :values()){
            if (action.getCode().equals(code)){
                return action;
            }
        }
        return null;
    }





}
